#ifndef SENS_IMG
#define SENS_IMG
// C++ wrapper for sens_receiver and img_sender
#include <string>

namespace Sensor {

#include "sens_receiver.h"
#include "img_sender.h"

// up to MAX_CON instances
class SensorReceiver {
 public: 
  SensorReceiver(tsens_callback callback);
  SensorReceiver(tsens_callback callback, int port);
  ~SensorReceiver(); // thread stopped here, thus properly destruct it
  tsens_data poll();
  int get_port();
 private:
  int port;
  SensorReceiver& operator=(const SensorReceiver& );
  SensorReceiver(const SensorReceiver& );  
};

// SensorPoller, polling data; either poll or use callbacks, not both
class SensorPoller {
 public:
  SensorPoller();
  SensorPoller(int port);
  ~SensorPoller(); // thread stopped here, thus properly destruct it
  tsens_data poll();
 private:
  int port;
  SensorPoller& operator=(const SensorPoller& );
  SensorPoller(const SensorPoller& );
};

// just one instance recommended
class ImgSenderHTTP {
 public:
  ImgSenderHTTP();
  ImgSenderHTTP(std::string host, int port);
  ~ImgSenderHTTP();
  int send(const char *blob, int bloblen);
 private:
  std::string host;
  int port;
};

}

#endif
